<!doctype html>



  


<html class="theme-next muse use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Hexo, NexT" />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.0" />






<meta name="description" content="链表代码 linked-list.c12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970#include &quot;node.h&quot;#include &amp;lt;stdio.h&amp;gt;#include &amp;">
<meta property="og:type" content="article">
<meta property="og:title" content="C语言链表">
<meta property="og:url" content="http://yoursite.com/2017/03/24/C语言链表/index.html">
<meta property="og:site_name" content="jeniusLi's blog">
<meta property="og:description" content="链表代码 linked-list.c12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970#include &quot;node.h&quot;#include &amp;lt;stdio.h&amp;gt;#include &amp;">
<meta property="og:updated_time" content="2017-03-27T07:16:18.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="C语言链表">
<meta name="twitter:description" content="链表代码 linked-list.c12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970#include &quot;node.h&quot;#include &amp;lt;stdio.h&amp;gt;#include &amp;">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2017/03/24/C语言链表/"/>





  <title> C语言链表 | jeniusLi's blog </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  














  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">jeniusLi's blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">生活、技术个人博客</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/03/24/C语言链表/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Jenius">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/jenius.jpeg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="jeniusLi's blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                C语言链表
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-03-24T18:06:43+08:00">
                2017-03-24
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="链表"><a href="#链表" class="headerlink" title="链表"></a>链表</h2><h2 id="代码-linked-list-c"><a href="#代码-linked-list-c" class="headerlink" title="代码 linked-list.c"></a>代码 linked-list.c</h2><figure class="highlight c"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div><div class="line">66</div><div class="line">67</div><div class="line">68</div><div class="line">69</div><div class="line">70</div></pre></td><td class="code"><pre><div class="line"><span class="meta">#<span class="meta-keyword">include</span> <span class="meta-string">"node.h"</span></span></div><div class="line"><span class="meta">#<span class="meta-keyword">include</span> <span class="meta-string">&lt;stdio.h&gt;</span></span></div><div class="line"><span class="meta">#<span class="meta-keyword">include</span> <span class="meta-string">&lt;stdlib.h&gt;</span></span></div><div class="line"></div><div class="line"><span class="comment">// typedef struct _node&#123;</span></div><div class="line"><span class="comment">// 	int value;</span></div><div class="line"><span class="comment">// 	struct _node *next;</span></div><div class="line"><span class="comment">// &#125;Node;</span></div><div class="line"></div><div class="line"><span class="keyword">typedef</span> <span class="keyword">struct</span> _list&#123; <span class="comment">// 没有做尾指针</span></div><div class="line">	Node *head;</div><div class="line">	Node *tail;</div><div class="line">&#125; List;</div><div class="line"></div><div class="line"></div><div class="line"><span class="function"><span class="keyword">void</span> <span class="title">add</span><span class="params">(List *<span class="built_in">list</span>, <span class="keyword">int</span> number)</span></span>;</div><div class="line"><span class="function"><span class="keyword">void</span> <span class="title">add2</span><span class="params">(List *<span class="built_in">list</span>, <span class="keyword">int</span> number)</span></span>;</div><div class="line"></div><div class="line"><span class="function"><span class="keyword">int</span> <span class="title">main</span><span class="params">(<span class="keyword">int</span> argc, <span class="keyword">char</span> <span class="keyword">const</span> *argv[])</span></span></div><div class="line">&#123;</div><div class="line">	List <span class="built_in">list</span>;</div><div class="line">	<span class="built_in">list</span>.head = <span class="built_in">list</span>.tail = <span class="literal">NULL</span>;</div><div class="line">	<span class="keyword">int</span> number;</div><div class="line">	<span class="keyword">do</span>&#123;</div><div class="line">		<span class="built_in">scanf</span>(<span class="string">"%d"</span>,&amp;number);</div><div class="line">		<span class="keyword">if</span>(number != <span class="number">-1</span>)&#123;</div><div class="line">			add2(&amp;<span class="built_in">list</span>,number);</div><div class="line">		&#125;</div><div class="line">	&#125;<span class="keyword">while</span>(number != <span class="number">-1</span>);</div><div class="line">	<span class="keyword">for</span> (Node *q = <span class="built_in">list</span>.head;q;q=q-&gt;next)&#123;</div><div class="line">		<span class="built_in">printf</span>(<span class="string">"%d"</span>,q-&gt;value);</div><div class="line">	&#125;</div><div class="line">	<span class="keyword">return</span> <span class="number">0</span>;</div><div class="line">&#125;</div><div class="line"></div><div class="line"><span class="function"><span class="keyword">void</span> <span class="title">add</span><span class="params">(List *<span class="built_in">list</span>, <span class="keyword">int</span> number)</span></span>&#123;</div><div class="line">	<span class="comment">// add to linked-list</span></div><div class="line">	Node *p = (Node*)<span class="built_in">malloc</span>(<span class="keyword">sizeof</span>(Node));</div><div class="line">	p-&gt;value = number;</div><div class="line">	p-&gt;next = <span class="literal">NULL</span>;</div><div class="line">	<span class="comment">// find last node</span></div><div class="line">	Node *last = <span class="built_in">list</span>-&gt;head;</div><div class="line">	<span class="keyword">if</span>(last)&#123;</div><div class="line">		<span class="keyword">while</span>(last-&gt;next)&#123;</div><div class="line">			last = last-&gt;next;</div><div class="line">		&#125;</div><div class="line">		last-&gt;next = p;</div><div class="line">	&#125;<span class="keyword">else</span>&#123;</div><div class="line">		<span class="built_in">list</span>-&gt;head = p;</div><div class="line">	&#125;</div><div class="line"></div><div class="line"></div><div class="line">&#125;</div><div class="line"></div><div class="line"><span class="function"><span class="keyword">void</span> <span class="title">add2</span><span class="params">(List *<span class="built_in">list</span>, <span class="keyword">int</span> number)</span></span>&#123;  <span class="comment">// 哎，早画图早解决了服了</span></div><div class="line">	<span class="comment">// add to linked-list</span></div><div class="line">	Node *p = (Node*)<span class="built_in">malloc</span>(<span class="keyword">sizeof</span>(Node));</div><div class="line">	p-&gt;value = number;</div><div class="line">	p-&gt;next = <span class="literal">NULL</span>;</div><div class="line">	<span class="comment">// find last node</span></div><div class="line">	<span class="keyword">if</span>(<span class="built_in">list</span>-&gt;tail)&#123;</div><div class="line">		(<span class="built_in">list</span>-&gt;tail)-&gt;next = p;</div><div class="line">		<span class="built_in">list</span>-&gt;tail = (<span class="built_in">list</span>-&gt;tail)-&gt;next;</div><div class="line"></div><div class="line">	&#125;<span class="keyword">else</span>&#123;</div><div class="line">		<span class="built_in">list</span>-&gt;head = <span class="built_in">list</span>-&gt;tail = p;</div><div class="line"></div><div class="line">	&#125;</div><div class="line"></div><div class="line">&#125;</div></pre></td></tr></table></figure>
<p>这是实现了基本的创建链表功能，有两个版本第一个版本(函数add())与第二个版本(add2())相比，第二个版本是具有为指针的每一次不用从头遍历到尾节点。</p>
<p>##删除加寻找<br><figure class="highlight c"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div><div class="line">66</div><div class="line">67</div><div class="line">68</div><div class="line">69</div><div class="line">70</div><div class="line">71</div><div class="line">72</div><div class="line">73</div><div class="line">74</div><div class="line">75</div><div class="line">76</div><div class="line">77</div><div class="line">78</div><div class="line">79</div><div class="line">80</div><div class="line">81</div><div class="line">82</div><div class="line">83</div><div class="line">84</div><div class="line">85</div><div class="line">86</div><div class="line">87</div><div class="line">88</div><div class="line">89</div><div class="line">90</div><div class="line">91</div><div class="line">92</div><div class="line">93</div><div class="line">94</div><div class="line">95</div><div class="line">96</div><div class="line">97</div><div class="line">98</div><div class="line">99</div><div class="line">100</div><div class="line">101</div><div class="line">102</div><div class="line">103</div><div class="line">104</div><div class="line">105</div></pre></td><td class="code"><pre><div class="line"><span class="meta">#<span class="meta-keyword">include</span> <span class="meta-string">"node.h"</span></span></div><div class="line"><span class="meta">#<span class="meta-keyword">include</span> <span class="meta-string">&lt;stdio.h&gt;</span></span></div><div class="line"><span class="meta">#<span class="meta-keyword">include</span> <span class="meta-string">&lt;stdlib.h&gt;</span></span></div><div class="line"></div><div class="line"><span class="comment">// typedef struct _node&#123;</span></div><div class="line"><span class="comment">// 	int value;</span></div><div class="line"><span class="comment">// 	struct _node *next;</span></div><div class="line"><span class="comment">// &#125;Node;</span></div><div class="line"></div><div class="line"><span class="keyword">typedef</span> <span class="keyword">struct</span> _list&#123; <span class="comment">// 没有为检点的版本</span></div><div class="line">	Node *head;</div><div class="line">	Node *tail;</div><div class="line">&#125; List;</div><div class="line"></div><div class="line"><span class="comment">// typedef struct _list&#123;</span></div><div class="line"><span class="comment">// 	Node *head;</span></div><div class="line"><span class="comment">// 	Node *tail;</span></div><div class="line"><span class="comment">// &#125; List;</span></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"><span class="function"><span class="keyword">void</span> <span class="title">add</span><span class="params">(List *<span class="built_in">list</span>, <span class="keyword">int</span> number)</span></span>;</div><div class="line"><span class="function"><span class="keyword">void</span> <span class="title">add2</span><span class="params">(List *<span class="built_in">list</span>, <span class="keyword">int</span> number)</span></span>;</div><div class="line"><span class="function"><span class="keyword">void</span> <span class="title">print</span><span class="params">(List *<span class="built_in">list</span>)</span></span>;</div><div class="line"><span class="function"><span class="keyword">void</span> <span class="title">queryAndDelete</span><span class="params">(List *<span class="built_in">list</span>, <span class="keyword">int</span> number)</span></span>;</div><div class="line"></div><div class="line"><span class="function"><span class="keyword">int</span> <span class="title">main</span><span class="params">(<span class="keyword">int</span> argc, <span class="keyword">char</span> <span class="keyword">const</span> *argv[])</span></span></div><div class="line">&#123;</div><div class="line">	List <span class="built_in">list</span>;</div><div class="line">	<span class="built_in">list</span>.head = <span class="built_in">list</span>.tail = <span class="literal">NULL</span>;</div><div class="line">	<span class="keyword">int</span> number;</div><div class="line">	<span class="keyword">do</span>&#123;</div><div class="line">		<span class="built_in">scanf</span>(<span class="string">"%d"</span>,&amp;number);</div><div class="line">		<span class="keyword">if</span>(number != <span class="number">-1</span>)&#123;</div><div class="line">			add2(&amp;<span class="built_in">list</span>,number);</div><div class="line">		&#125;</div><div class="line">	&#125;<span class="keyword">while</span>(number != <span class="number">-1</span>);</div><div class="line">	print(&amp;<span class="built_in">list</span>);</div><div class="line">	<span class="built_in">scanf</span>(<span class="string">"%d"</span>,&amp;number);</div><div class="line">	queryAndDelete(&amp;<span class="built_in">list</span>,number);</div><div class="line">	print(&amp;<span class="built_in">list</span>);</div><div class="line">	<span class="keyword">return</span> <span class="number">0</span>;</div><div class="line">&#125;</div><div class="line"></div><div class="line"><span class="function"><span class="keyword">void</span> <span class="title">add</span><span class="params">(List *<span class="built_in">list</span>, <span class="keyword">int</span> number)</span></span>&#123;</div><div class="line">	<span class="comment">// add to linked-list</span></div><div class="line">	Node *p = (Node*)<span class="built_in">malloc</span>(<span class="keyword">sizeof</span>(Node));</div><div class="line">	p-&gt;value = number;</div><div class="line">	p-&gt;next = <span class="literal">NULL</span>;</div><div class="line">	<span class="comment">// find last node</span></div><div class="line">	Node *last = <span class="built_in">list</span>-&gt;head;</div><div class="line">	<span class="keyword">if</span>(last)&#123;</div><div class="line">		<span class="keyword">while</span>(last-&gt;next)&#123;</div><div class="line">			last = last-&gt;next;</div><div class="line">		&#125;</div><div class="line">		last-&gt;next = p;</div><div class="line">	&#125;<span class="keyword">else</span>&#123;</div><div class="line">		<span class="built_in">list</span>-&gt;head = p;</div><div class="line">	&#125;</div><div class="line"></div><div class="line"></div><div class="line">&#125;</div><div class="line"></div><div class="line"><span class="function"><span class="keyword">void</span> <span class="title">add2</span><span class="params">(List *<span class="built_in">list</span>, <span class="keyword">int</span> number)</span></span>&#123;  <span class="comment">// 哎，早画图早解决了服了</span></div><div class="line">	<span class="comment">// add to linked-list</span></div><div class="line">	Node *p = (Node*)<span class="built_in">malloc</span>(<span class="keyword">sizeof</span>(Node));</div><div class="line">	p-&gt;value = number;</div><div class="line">	p-&gt;next = <span class="literal">NULL</span>;</div><div class="line">	<span class="comment">// find last node</span></div><div class="line">	<span class="keyword">if</span>(<span class="built_in">list</span>-&gt;tail)&#123;</div><div class="line">		(<span class="built_in">list</span>-&gt;tail)-&gt;next = p;</div><div class="line">		<span class="built_in">list</span>-&gt;tail = (<span class="built_in">list</span>-&gt;tail)-&gt;next;</div><div class="line"></div><div class="line">	&#125;<span class="keyword">else</span>&#123;</div><div class="line">		<span class="built_in">list</span>-&gt;head = <span class="built_in">list</span>-&gt;tail = p;</div><div class="line"></div><div class="line">	&#125;</div><div class="line"></div><div class="line">&#125;</div><div class="line"></div><div class="line"><span class="function"><span class="keyword">void</span> <span class="title">print</span><span class="params">(List *<span class="built_in">list</span>)</span></span>&#123;</div><div class="line">	<span class="keyword">for</span> (Node *q = <span class="built_in">list</span>-&gt;head;q;q=q-&gt;next)&#123;</div><div class="line">		<span class="built_in">printf</span>(<span class="string">"%d\t"</span>,q-&gt;value);</div><div class="line">	&#125;</div><div class="line">	<span class="built_in">printf</span>(<span class="string">"\n"</span>);</div><div class="line">&#125;</div><div class="line"><span class="function"><span class="keyword">void</span> <span class="title">queryAndDelete</span><span class="params">(List *<span class="built_in">list</span>,<span class="keyword">int</span> number)</span></span>&#123;</div><div class="line">	<span class="keyword">int</span> isFound = <span class="number">0</span>;</div><div class="line">	Node *p = <span class="literal">NULL</span>;</div><div class="line">	<span class="keyword">for</span> ( Node *q = <span class="built_in">list</span>-&gt;head;q;p = q,q=q-&gt;next)&#123;</div><div class="line">		<span class="keyword">if</span>(q-&gt;value == number)&#123;</div><div class="line">			isFound = <span class="number">1</span>;</div><div class="line">			<span class="keyword">if</span>(q)&#123;</div><div class="line">				p-&gt;next = q-&gt;next;</div><div class="line">			&#125;<span class="keyword">else</span>&#123;</div><div class="line">				(<span class="built_in">list</span>-&gt;head)-&gt;next = q-&gt;next;</div><div class="line">			&#125;</div><div class="line">			<span class="built_in">free</span>(q);</div><div class="line">			<span class="keyword">break</span>;</div><div class="line">		&#125;</div><div class="line">	&#125;</div><div class="line">	<span class="keyword">if</span>(isFound)&#123;</div><div class="line">		<span class="built_in">printf</span>(<span class="string">"找到了\n"</span>);</div><div class="line">	&#125;</div><div class="line">&#125;</div></pre></td></tr></table></figure></p>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>


    <footer class="post-footer">
      

      
        
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/03/20/构造之法第5章/" rel="next" title="构造之法第5章">
                <i class="fa fa-chevron-left"></i> 构造之法第5章
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>

          
          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/jenius.jpeg"
               alt="Jenius" />
          <p class="site-author-name" itemprop="name">Jenius</p>
           
              <p class="site-description motion-element" itemprop="description">主要是学习后端技术，学过Java web、python web等后台技术</p>
          
        </div>
        <nav class="site-state motion-element">
        
          
            <div class="site-state-item site-state-posts">
              <a href="/archives">
                <span class="site-state-item-count">6</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          

          

        </nav>

        

        <div class="links-of-author motion-element">
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#链表"><span class="nav-number">1.</span> <span class="nav-text">链表</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#代码-linked-list-c"><span class="nav-number">2.</span> <span class="nav-text">代码 linked-list.c</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Jenius</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Muse
  </a>
</div>


        

        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    
    
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  




  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script>



  



  




	





  





  





  



  
  

  

  

  

  


  

</body>
</html>
